package demo04;
//byte short int long float double char boolean
//String
//在调用输出语句的时候，println方法其实就是提供了多种数据类型的重载形式
public class Demo04OverLoodPrint {
    public static void main(String[] args) {
        myPrint(100);//int
        myPrint("hello");//string
    }
    public static void myPrint(byte num) {
        System.out.println(num);
    }
    public static void myPrint(short num) {
        System.out.println(num);
    }
    public static void myPrint(int num) {
        System.out.println(num);
    }
    public static void myPrint(float num) {
        System.out.println(num);
    }
    public static void myPrint(double num) {
        System.out.println(num);
    }
    public static void myPrint(String num) {
        System.out.println(num);
    }
}
